package adapt;


/**
 * @author 帅小伙
 * @date 2021/12/27
 * @description
 */
public class Test {

    public static void main(String[] args) {
        Teacher teacher = new Teacher() {
            @Override
            public void eat() {
                System.out.println("老师狂吃");
            }

            @Override
            public void work() {
                System.out.println("老师狂工作");
            }
        };

        TeacherAdapter teacherAdapter = new TeacherAdapter(teacher);
        test(teacherAdapter);
    }

    public static void test(Student student) {
        student.eat();
        student.learn();
    }
}
